package com.cb.spzx.manager.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cb.spzx.manager.service.ProductSpecService;
import com.cb.spzx.manager.mapper.ProductSpecMapper;
import com.cb.spzx.model.entity.product.ProductSpec;
import org.springframework.stereotype.Service;

/**
* @author lenovo
* @description 针对表【product_spec(商品规格)】的数据库操作Service实现
* @createDate 2024-04-14 17:39:22
*/
@Service
public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, ProductSpec> implements ProductSpecService{

    @Override
    public IPage<ProductSpec> findByPage(Page<ProductSpec> productSpecPage) {
        LambdaQueryWrapper<ProductSpec> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.orderByDesc(ProductSpec::getId);
        return baseMapper.selectPage(productSpecPage,queryWrapper);
    }
}




